package com.example.tests;

import java.util.Set;

import org.testng.annotations.Test;

public class ContactRemovalTests extends TestBase {
	
	@Test
	public void testFirstContactCanBeRemoved() throws Exception {
		int i = 3;
		Set<ContactObject> oldList = app.getContactHelper().getContacts();
		ContactObject contact = app.getContactHelper().getContactWithNumber(i);
		app.getContactHelper().deleteContact(i);
		Set<ContactObject> newList = app.getContactHelper().getContacts();
		verifyContactRemoved(oldList, contact, newList);
	}
	
	@Test
	public void testFirstContactCanBeRemoved1() throws Exception {
		int i = 3;
		Set<ContactObject> oldList = app.getContactHelper().getContacts();
		ContactObject contact = app.getContactHelper().getContactWithNumber(i);
		app.getContactHelper().deleteContact(i);
		Set<ContactObject> newList = app.getContactHelper().getContacts();
		verifyContactRemoved(oldList, contact, newList);
	}
	
	@Test
	public void testFirstContactCanBeRemoved2() throws Exception {
		int i = 3;
		Set<ContactObject> oldList = app.getContactHelper().getContacts();
		ContactObject contact = app.getContactHelper().getContactWithNumber(i);
		app.getContactHelper().deleteContact(i);
		Set<ContactObject> newList = app.getContactHelper().getContacts();
		verifyContactRemoved(oldList, contact, newList);
	}
	
	@Test
	public void testFirstContactCanBeRemoved3() throws Exception {
		int i = 3;
		Set<ContactObject> oldList = app.getContactHelper().getContacts();
		ContactObject contact = app.getContactHelper().getContactWithNumber(i);
		app.getContactHelper().deleteContact(i);
		Set<ContactObject> newList = app.getContactHelper().getContacts();
		verifyContactRemoved(oldList, contact, newList);
	}
	
	@Test
	public void testFirstContactCanBeRemoved4() throws Exception {
		int i = 3;
		Set<ContactObject> oldList = app.getContactHelper().getContacts();
		ContactObject contact = app.getContactHelper().getContactWithNumber(i);
		app.getContactHelper().deleteContact(i);
		Set<ContactObject> newList = app.getContactHelper().getContacts();
		verifyContactRemoved(oldList, contact, newList);
	}
	
	@Test
	public void testFirstContactCanBeRemoved5() throws Exception {
		int i = 3;
		Set<ContactObject> oldList = app.getContactHelper().getContacts();
		ContactObject contact = app.getContactHelper().getContactWithNumber(i);
		app.getContactHelper().deleteContact(i);
		Set<ContactObject> newList = app.getContactHelper().getContacts();
		verifyContactRemoved(oldList, contact, newList);
	}
	
	@Test
	public void testFirstContactCanBeRemoved6() throws Exception {
		int i = 3;
		Set<ContactObject> oldList = app.getContactHelper().getContacts();
		ContactObject contact = app.getContactHelper().getContactWithNumber(i);
		app.getContactHelper().deleteContact(i);
		Set<ContactObject> newList = app.getContactHelper().getContacts();
		verifyContactRemoved(oldList, contact, newList);
	}
	
	@Test
	public void testFirstContactCanBeRemoved7() throws Exception {
		int i = 3;
		Set<ContactObject> oldList = app.getContactHelper().getContacts();
		ContactObject contact = app.getContactHelper().getContactWithNumber(i);
		app.getContactHelper().deleteContact(i);
		Set<ContactObject> newList = app.getContactHelper().getContacts();
		verifyContactRemoved(oldList, contact, newList);
	}
	
	@Test
	public void testFirstContactCanBeRemoved8() throws Exception {
		int i = 3;
		Set<ContactObject> oldList = app.getContactHelper().getContacts();
		ContactObject contact = app.getContactHelper().getContactWithNumber(i);
		app.getContactHelper().deleteContact(i);
		Set<ContactObject> newList = app.getContactHelper().getContacts();
		verifyContactRemoved(oldList, contact, newList);
	}
	
	@Test
	public void testFirstContactCanBeRemoved9() throws Exception {
		int i = 3;
		Set<ContactObject> oldList = app.getContactHelper().getContacts();
		ContactObject contact = app.getContactHelper().getContactWithNumber(i);
		app.getContactHelper().deleteContact(i);
		Set<ContactObject> newList = app.getContactHelper().getContacts();
		verifyContactRemoved(oldList, contact, newList);
	}
	
	@Test
	public void testFirstContactCanBeRemoved10() throws Exception {
		int i = 3;
		Set<ContactObject> oldList = app.getContactHelper().getContacts();
		ContactObject contact = app.getContactHelper().getContactWithNumber(i);
		app.getContactHelper().deleteContact(i);
		Set<ContactObject> newList = app.getContactHelper().getContacts();
		verifyContactRemoved(oldList, contact, newList);
	}
	
	@Test
	public void testFirstContactCanBeRemoved11() throws Exception {
		int i = 3;
		Set<ContactObject> oldList = app.getContactHelper().getContacts();
		ContactObject contact = app.getContactHelper().getContactWithNumber(i);
		app.getContactHelper().deleteContact(i);
		Set<ContactObject> newList = app.getContactHelper().getContacts();
		verifyContactRemoved(oldList, contact, newList);
	}
	
}